import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { knowledge } from '../apiModulesType';

// 字典
export function get(dictName: any): AxiosPromise<any> {
  const params = {
    dictName,
    page: 0,
    size: 9999
  };
  return request({
    url: `${knowledge}/api/dictDetail`,
    method: 'get',
    params: params
  });
}

// 查询列表
export function apiEnterpriseMaterialFilesTreeGet(query: any): AxiosPromise<any> {
  return request({
    url: `${knowledge}/api/enterpriseMaterialFilesTree`,
    method: 'get',
    params: query
  });
}

// 编辑
export function apiEnterpriseMaterialFilesTreePut(data: any): AxiosPromise<any> {
  return request({
    url: `${knowledge}/api/enterpriseMaterialFilesTree`,
    method: 'put',
    data: data
  });
}

// 删除
export function apiEnterpriseMaterialFilesTreeDelete(data: any): AxiosPromise<any> {
  return request({
    url: `${knowledge}/api/enterpriseMaterialFilesTree`,
    method: 'delete',
    data: data
  });
}

// 新增
export function apiEnterpriseMaterialFilesTreePost(data: any): AxiosPromise<any> {
  return request({
    url: `${knowledge}/api/enterpriseMaterialFilesTree`,
    method: 'post',
    data: data
  });
}
